home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 1 (Walnut Creek)
/
Aminet - June 1993 [Walnut Creek].iso
/
aminet
/
util
/
edit
/
ced_programs.lha
/
CED-Programs
/
Left-C-Comment.ced
< prev
next >
Wrap
Text File
|
1993-02-14
|
861b
|
51 lines
/*
* Left-C-Comment.ced
*
* Put a nice C-style comment on the left hand side of the current block
* or current line.
*
* Author: Stefan Winterstein (winter@cs.uni-sb.de)
* Status: Public Domain
*
*/
LF = '0A'X
options results /* Allow CygnusEd to pass status variables */
address 'rexx_ced' /* Tell ARexx to talk to CygnusEd */
status 47 /* get current line number */
start = result
status 69 /* get start of block */
end = result
if end = -1 then do /* No block marked */
end = start+1
end
else do
'mark block' /* turn block marking off */
end
if start > end then do /* swap start with end */
t = start
start = end
end = t
end
'jump to line' start+1 /* goto start of block */
'text' '/*'LF
do line = start while line < end
'text' ' * '
'beg of line'
'down'
end
'text' ' */'LF
'jump to line' start+1 /* reset cursor */
exit